package net.data;

public class ResponseResult
{
	private String toAddress;
	private String query;
	private String response;
	
	public String getToAddress() {
		return toAddress;
	}
	public void setToAddress(String toAddress) {
		this.toAddress = toAddress;
	}
	public String getQuery() {
		return query;
	}
	public String getQueryType()
	{
		int separator = query.indexOf("?");
		if(separator > 0)
		{
			return query.substring(0, separator);
		}
		else return "invlalid";
	}
	
	/*
	public Map<String,String> getParameters()
	{
		Map<String, String> params = new HashMap<String, String>();
		
		int start = query.indexOf("?");
		int end;
		if(start != -1)
		{
			while((end = query.indexOf("&", start)) != -1)
			{
				String entry = query.substring(start, end);
				int separator = query.indexOf("=");
				if(separator != -1)
				{
					String key = entry.substring(0, separator);
					String value = entry.substring(separator+1);
					
					params.
				}
				
				start = end;
			}
		}
	}
	*/
		
	public void setQuery(String query) {
		this.query = query;
	}
	public String getResponse() {
		return response;
	}
	public void setResponse(String response) {
		this.response = response;
	}
	
}
